﻿<UserControl x:Class="MouseExtender.View.BaseItemView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:c="clr-namespace:MouseExtender.Plugins.Item"
             mc:Ignorable="d" 
             Width="{StaticResource ItemSize}"
             Height="{StaticResource ItemSize}"
             d:DesignHeight="300" d:DesignWidth="300">
    <Button Command="{Binding Source={StaticResource AppCommands}, Path=ClickItem}" CommandParameter="{Binding}">
        <Button.Template>
            <ControlTemplate>
                <Border Background="White" BorderThickness="1" BorderBrush="Black" CornerRadius="3" Margin="2" >
                    <c:ItemViewControl Content="{Binding}" />
                </Border>
            </ControlTemplate>
        </Button.Template>
    </Button>
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem  Header="Edit" Command="{Binding Source={StaticResource AppCommands}, Path=EditItem}" CommandParameter="{Binding}"/>
        </ContextMenu>
    </UserControl.ContextMenu>
</UserControl>
